package com.halfsword.creativecraft.entity.client;

import com.halfsword.creativecraft.CreativeCraft;
import com.halfsword.creativecraft.entity.custom.NothingEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.resources.ResourceLocation;

public class NothingRender extends MobRenderer<NothingEntity,NothingModel<NothingEntity>> {
    public NothingRender(EntityRendererProvider.Context p_174304_) {
        super(p_174304_, new NothingModel<>(p_174304_.bakeLayer(ModelLayers.NOTHING_LAYER)), 0.5F);
    }

    @Override
    public ResourceLocation getTextureLocation(NothingEntity p_114482_) {
        return ResourceLocation.fromNamespaceAndPath(CreativeCraft.MOD_ID,"textures/entity/custom/nothing.png");
    }

    @Override
    public void render(NothingEntity p_115455_, float p_115456_, float p_115457_, PoseStack p_115458_,
                       MultiBufferSource p_115459_, int p_115460_) {
        if (p_115455_.isBaby()) {
            p_115458_.scale(0.75f,0.75f,0.75f);
        }

        super.render(p_115455_, p_115456_, p_115457_, p_115458_, p_115459_, p_115460_);
    }
}
